<template>
  <div>
    库存管理
  </div>
</template>

<script>
export default {
  name: 'ProductCount',
  props: {
    value: {
      type: String,
      default: ''
    },
  },
  data() {
    return {
      editorOption: {},
      formData: {
        params_data: [
          { sn: '', title: '', num: '' }
        ],  // 清单
      },
      rules: {
        //sn: [{required: true, message: '请输入编号', trigger: 'blur'},],
        //title: [{required: true, message: '请输入名称', trigger: 'blur'},],
        //num: [{required: true, message: '请输入数量', trigger: 'blur'},],
      },
      size: 'medium',
      tableLayout: false,
      stripe: false,
      bordered: false,
      hover: true,
      showHeader: true,
      columns: [
        {colKey: 'sn', title: '编号', width: 180},
        {colKey: 'title', title: '名称'},
        {colKey: 'num', title: '数量', width: 180},
        {colKey: 'option', title: '操作', fixed: 'right', width: 120},
      ],
    }
  },
  mounted() {
  },
  methods: {
    submit() {
      return  this.$refs.form.validate()
    },
    handleCopy(row) {
      this.formData.params_data.push({ ...row })
    },
    handleDelete(row) {
      this.formData.params_data = this.formData.params_data.filter(item => item !== row)
    }
  }
}
</script>

<style lang="less" scoped>

</style>
